<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <div id="boxDiv">hello div <i>lili</i></div>
    <p id="boxP" hidden>hello p <b>jack</b></p>
    <script>
      const boxDiv = document.getElementById("boxDiv");
      const boxP = document.getElementById("boxP");

      console.log(boxDiv.hidden);
      console.log(boxP.hidden);

      setTimeout(() => {
        boxDiv.hidden = true;
      }, 3000);
    </script>
  </body>
</html>
